package lg.minecraft.plugin.pokedex.command;

import lg.minecraft.plugin.library.command.CommandContext;
import lg.minecraft.plugin.library.command.CommandType;
import lg.minecraft.plugin.library.command.SubCommand;
import lg.minecraft.plugin.pokedex.gui.GenInventory;
import org.bukkit.entity.Player;

/**
 * @author langle__
 * @version 1.0
 */
public class SubOpenCommand extends SubCommand {

    public SubOpenCommand() {
        super("open", "o");
    }

    @Override
    public String getPermission() {
        return "LGPokedex.command.open";
    }

    @Override
    public String getDescription() {
        return "打开界面";
    }

    @Override
    public CommandType getCommandType() {
        return CommandType.PLAYER;
    }

    @Override
    public void onCommand(CommandContext context) {
        Player player = context.getPlayer();
        new GenInventory().openInventory(player);
    }

}
